<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="language" value="${not empty param.language ? param.language : not empty language ? language : pageContext.request.locale}" scope="session" />
<fmt:setLocale value="${language}" />
<fmt:setBundle basename="properties.text" />
<title><fmt:message key="candidate" /></title>
</head>
<body>
	<td><input type="hidden" name=<fmt:message key="emptyfilledfirstname" /> id="emptyfilledfirstname"></td>
	<td><input type="hidden" name=<fmt:message key="emptyfilledlastname" /> id="emptyfilledlastname"></td>
	<td><input type="hidden" name=<fmt:message key="emptyfilledadress" /> id="emptyfilledadress"></td>
	<td><input type="hidden" name=<fmt:message key="emptyfilledcellnum" /> id="emptyfilledcellnum"></td>
	<td><input type="hidden" name=<fmt:message key="wrongfilledcellnum" /> id="wrongfilledcellnum"></td>
	<td><input type="hidden" name=<fmt:message key="emptyfilledmail" /> id="emptyfilledmail"></td>
	<td><input type="hidden" name=<fmt:message key="wrongfilledmail" /> id="wrongfilledmail"></td>
	<td><input type="hidden" name=<fmt:message key="wrongfilledhomenum" /> id="ewrongfilledhomenum"></td>
	<td><input type="hidden" name=<fmt:message key="emptyfilledcv" /> id="emptyfilledcv"></td>
 	<div style="margin-left:9%;margin-top:2%">
	<form action="crudCandidate" method="POST"
		enctype="multipart/form-data">
		<table columns="2">
			<input id="id" type="text" name="id" value="" size="1"
				style="display: none;" />
			<tr>
			<td>
			 	<fmt:message key="firstname" />:
			 	</td>
			 	<td>
			 	<input id="firstName" type="text" name="firstName" value="" size="20" />
				</td>
			</tr> 
			<tr>
				<td>
				<fmt:message key="lastname" />:
				</td>
				<td>
				<input id="lastName" type="text" name="lastName" value="" size="20" /> 
				</td>
			</tr> 
			<tr>
				<td>	
					<fmt:message key="adress" />:
				</td>
				<td>
					<input id="address" type="text" name="address" value="" size="20" />
				</td> 
			</tr> 
			<tr>
			<td>
			<fmt:message key="homenumber" />:
			</td>
			<td>
				<input	id="homeNumber" type="text" name="homeNumber" value="" size="20" />
			</td>	
			</tr>  
			<tr>
			<td>
			<fmt:message key="cellnumber" />:
			</td>
			<td>
			<input id="cellNumber" type="text" name="cellNumber" value="" size="20" />
			</td>
			</tr>
			<tr>
			<td>
			<fmt:message key="email" />:
			</td>
			<td>
			<input id="email" type="text" name="e-mail" value="" size="20" /> 
			</td>
			</tr>
			<tr>
			<td>
			<fmt:message key="relocation" />:
			</td>
			<td>
			<input name="relocation" id="relocation" type="checkbox">
			</td>
			</tr> 
			<tr>
			<td>
			<fmt:message key="cv" />:
			</td>
			<td><input type="file" id="cv" name="cv" /> 
			</td>
			</tr>
			<tr>
			<td>
			<fmt:message key="forposition" />:
			</td>
			<td>
			<select name="position" id="position">
				<c:forEach items="${pos}" var="posit">
					<option value="${posit.idPosition}">${posit.name}</option>
				</c:forEach>
			</select>
			</td>
			</tr>
			<td colspan="2">
				<input type="submit" id="insert" value=<fmt:message key="insert" /> name="add"
					onclick="return validateFields(this.id);" />
				<input type="submit" id="edit" value=<fmt:message key="edit" /> name="edit"
					onclick="return validateFields(this.id);" />
				<input type="submit" value=<fmt:message key="remove" /> name="delete" />
			
			<c:if
				test="<%=request.getSession().getAttribute("savedUserType")
							.equals("Director General")%>">
				<input type="submit" value=<fmt:message key="hire" /> name="hire" />
			</c:if>
			</td>
		</table>
	</form>
	<input type="submit"  style="margin-left:0.5%" value=<fmt:message key="clear" /> name="clear"
		onclick="return clearFields();" />
	</div>




</body>
</html>